package openbang.account.service.entity;


import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import openbang.account.service.vo.GroupTypeEnum;

import com.google.gwt.user.client.rpc.IsSerializable;

import java.util.Date;


/**
 * 组的定义
 * 如：普通好友、绝密好友
 *     头像、生活、家庭
 * 2010-02-12 用户在上传头像时,系统自动建立一个名为"face photo"的组。
 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Group implements IsSerializable {
	public static final String DefaultFacePhoto = "face photo";  

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private String title;

	@Persistent
	private String description;
	
	@Persistent
	private Date creation=new Date();

	@Persistent
	private Long userId=0L;

	@Persistent
	private Integer groupType=GroupTypeEnum.MEDIA.getCode();
	
	@Persistent
	private Date updTime= new Date();

    public Group() {
    }

	public Integer getGroupType() {
		return groupType;
	}

	public void setGroupType(Integer groupType) {
		this.groupType = groupType;
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCreation() {
		return creation;
	}

	public void setCreation(Date creation) {
		this.creation = creation;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Date getUpdTime() {
		return updTime;
	}

	public void setUpdTime(Date updTime) {
		this.updTime = updTime;
	}


}